Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partially implementing st_equals #1512

Merged
merged 13 commits into from
Mar 31, 2023
Merged

partially implementing st_equals #1512

merged 13 commits into from
Mar 31, 2023

Conversation

jycor
Copy link
Contributor

@jycor jycor commented Jan 4, 2023

MySQL docs for reference: https://dev.mysql.com/doc/refman/8.0/en/spatial-relation-functions-object-shapes.html#function_st-equals

This adds support for st_equals() only in the Point vs Point case. There are skipped tests for all other cases.

@jycor jycor marked this pull request as draft January 4, 2023 23:44
@jycor jycor changed the base branch from main to james/st-within January 6, 2023 08:26
@jycor jycor marked this pull request as ready for review March 30, 2023 18:03
@jycor jycor changed the title implementing st_equals partially implementing st_equals Mar 30, 2023
Copy link
Contributor

@andy-wm-arthur andy-wm-arthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines 41 to 50
if _, ok := e.(*spatial.Intersects); ok {
return true
}
if _, ok := e.(*spatial.Within); ok {
return true
}
if _, ok := e.(*spatial.STEquals); ok {
return true
}
return false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using a switch here is more idiomatic for the analyzer:

switch e.(type) {
case *spatial.Intersects, *spatial.Within, *spatial.STEquals:
    return true
default:
    return false
}

@jycor jycor changed the base branch from james/st-within to main March 31, 2023 20:07
@jycor jycor merged commit 8283e65 into main Mar 31, 2023
@jycor jycor deleted the james/st-equals branch July 21, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants